package com.ruoyi.demo.mapper;

import com.ruoyi.demo.domain.UserPhoto;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TakePhotoMapper {
    /**
     * 新增照片记录
     */
    public int insertUserPhoto(UserPhoto userPhoto);
    @Select("select user_name from sys_user where user_id=#{userId}")
    String selectUserNameById(Long userId);
    @Select("SELECT DISTINCT meet_id " +
            "FROM agenda " +
            "WHERE NOW() BETWEEN start_time AND end_time")
    List<Integer> selectMeetId();
    @Update("UPDATE meet_user " +
            "SET F_time = NOW(), is_attented = 0 " +
            "WHERE meet_id = #{meetId} AND user_id = #{userId}")
    int updateMeetUser(@Param("meetId") int meetId, @Param("userId") int userId);
    @Select("SELECT meet_id FROM meet_user WHERE user_id = #{userId} AND meet_id = #{meetId} LIMIT 1")
    Integer findMeetUserByUserIdAndMeetId(@Param("userId") int userId, @Param("meetId") int meetId);
}
